import http from "@/api/http";

export default {
    GetProblemsList(param) {
        return http.get(`/problem-list`, param);
    },
    GetPidProblem(param) {
        return http.postJson(`/problem-pid`, param);
    },
    GetCompetitionsList(param) {
        return http.get(`/competition-list`, param);
    },
    GetCidCompetition(param) {
        return http.postJson(`/competition-cid`, param);
    },
    GetCidCompetitionProblem(param) {
        return http.postJson(`/competition-cid-pid`, param);
    },
    GetCidCompetitionOneProblemDetail(param) {
        return http.postJson("/competition-cid-detail-pid", param);
    },
    AddProblem(param) {
        return http.post(`/problem-add`, param);
    },
    RunProblemCode(param) {
        return http.post('/submit-code', param);
    },
    GetStatus(param) {
        return http.get('/status-list', param);
    },
    GetCidStatusList(param) {
        return http.post('/status-list-cid', param);
    },
    GetStatusCode(param) {
        return http.post('/status-list-runID', param);
    },
    GetUser(param) {
        return http.get('/user-list', param);
    },
    AddCompetition(param) {
        return http.post('/add-competition', param);
    },
    Login(param) {
        return http.postJson('/login', param);
    },
    Register(param) {
        return http.postJson('/register', param);
    },
    GetVerityCode(param) {
        return http.postJson('/veritycode', param);
    }
};
